from django.http import JsonResponse
from django.shortcuts import render

# Create your views here.

def test01(request):

    return render(request,'webtest/test01.html')


def ajax_demo1(request):
    return render(request,"webtest/ajax_demo1.html")


def ajax_add(request):
    i1 = int(request.GET.get("i1"))
    i2 = int(request.GET.get("i2"))
    ret = i1 + i2

    return JsonResponse(ret,safe=False)


def test02(request):
    return render(request,'webtest/test02.html')

def page1(request):
    return render(request,'webtest/page1.html')

def page2(request):
    return render(request,'webtest/page2.html')

def page3(request):
    return render(request,'webtest/page3.html')

def onepage(request):
    return render(request,'webtest/1.html')

def two_page(request):
    return render(request,'webtest/2.html')